package com.ws.q1.controller;

import com.ws.q1.bean.User;
import com.ws.q1.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("/hui")
public class HuiXian {
    @Autowired
    private UserService userService;

    @RequestMapping("/huixian")
    public String huixian(Integer id, Model model) {
        System.out.println(id);
        User user = userService.huixian(id);
        System.out.println(user);
        model.addAttribute("user", user);
        return "qiantai/updater";
    }
}
